from pathlib import Path
from core.detector import BaseOSDetector

class GentooDetector(BaseOSDetector):
    def detect(self) -> bool:
        return Path("/etc/gentoo-release").exists()
    
    def get_version(self) -> str:
        return Path("/etc/portage/make.conf").read_text().split("\n")[0].split()[-1]